package org.mosquitos.chat;

import net.jxta.endpoint.EndpointAddress;
import net.jxta.endpoint.EndpointListener;
import net.jxta.endpoint.Message;
import net.jxta.endpoint.MessageElement;

public class ReceiveListener implements EndpointListener {

	public void processIncomingMessage(Message msg, EndpointAddress source,EndpointAddress destination) {
		MessageElement announce = msg.getMessageElement("Chat");
		if(announce != null){
			System.out.println(announce.toString());
		}else{
			System.out.println("announce is null");
		}
	}

}
